package com.mk.cloud.common.interceptor.header;

import act.Act;
import act.app.ActionContext;
import org.osgl.inject.ValueLoader;

public class HeaderLoginUserFinder extends ValueLoader.Base {
    private static final String KEY_USER_KEY = "X-Partner-Token";

    @Override
    public Object get() {
        ActionContext context = ActionContext.current();
        if(context != null){
            String catchid = context.req().header(KEY_USER_KEY);
            return Act.cache().get(catchid);
//            return context.session().cached(catchid);
        }
        return null;
    }

}
